package com.ruoyi.grids.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 柜格状态对象 cabinet_grids
 *
 * @author ruoyi
 * @date 2025-06-03
 */
public class CabinetGrids extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 格口唯一ID */
    private Long gridId;

    /** 所属柜体ID */
    @Excel(name = "所属柜体ID")
    private String cabinetId;

    /** 格口编号(1-255) */
    @Excel(name = "格口编号(1-255)")
    private String gridNumber;

    /** 格口尺寸 */
    @Excel(name = "格口尺寸")
    private String size;

    /** 格口状态 */
    @Excel(name = "格口状态")
    private String status;

    /** 当前温度 */
    @Excel(name = "当前温度")
    private Long temperature;

    /** 当前湿度 */
    @Excel(name = "当前湿度")
    private Long humidity;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastUpdate;

    public void setGridId(Long gridId)
    {
        this.gridId = gridId;
    }

    public Long getGridId()
    {
        return gridId;
    }

    public void setCabinetId(String cabinetId)
    {
        this.cabinetId = cabinetId;
    }

    public String getCabinetId()
    {
        return cabinetId;
    }

    public void setGridNumber(String gridNumber)
    {
        this.gridNumber = gridNumber;
    }

    public String getGridNumber()
    {
        return gridNumber;
    }

    public void setSize(String size)
    {
        this.size = size;
    }

    public String getSize()
    {
        return size;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setTemperature(Long temperature)
    {
        this.temperature = temperature;
    }

    public Long getTemperature()
    {
        return temperature;
    }

    public void setHumidity(Long humidity)
    {
        this.humidity = humidity;
    }

    public Long getHumidity()
    {
        return humidity;
    }

    public void setLastUpdate(Date lastUpdate)
    {
        this.lastUpdate = lastUpdate;
    }

    public Date getLastUpdate()
    {
        return lastUpdate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("gridId", getGridId())
            .append("cabinetId", getCabinetId())
            .append("gridNumber", getGridNumber())
            .append("size", getSize())
            .append("status", getStatus())
            .append("temperature", getTemperature())
            .append("humidity", getHumidity())
            .append("lastUpdate", getLastUpdate())
            .toString();
    }
}
